package com.cardgame.model.card;

import lombok.Getter;
import lombok.Setter;

import java.util.Map;

@Getter
@Setter // ✅ 添加 Setter 以支持 Jackson 反序列化字段
public class RoleWeaponCard extends Card implements IRoleWeaponCard {
    private Integer addHPMax;
    private Integer addAttack;

    public RoleWeaponCard(Integer id, String name, String imageUrl, String introduction, Integer price, Integer cost, Integer addHPMax,
            Integer addAttack) {
        super(id, name, imageUrl, introduction, "role_weapon", price, cost);
        this.addHPMax = addHPMax;
        this.addAttack = addAttack;
    }

    public RoleWeaponCard() {
        super();
    }

    @Override
    public Map<String, Object> toMap() {
        Map<String, Object> map = super.toMap();
        map.put("addHPMax", addHPMax);
        map.put("addAttack", addAttack);
        return map;
    }
}